<?php
	require '../include/library.inc.php';
	require '../include/admin_login.inc.php';
	
	$menu_id = intval($_GET['menu_id']);
	
	if($menu_id) {
	  
		$sql = "DELETE FROM 
				   menus
				WHERE
				   menu_id = '$menu_id'
				 ";
		query($sql);
		
		$sql = "DELETE FROM 
				   menu_description
				WHERE
				   menu_id = '$menu_id'
				 ";
		query($sql);
					
		$_SESSION['message'] = 'Записът е изтрит успешно!';
	
	}
  
	redirect($_SERVER['HTTP_REFERER']);
 
?>